<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
        
        Test du composant 1:
        <a href="?composant=composant_1">test vue composant 1</a>      
        <?php
        require_once 'config.php';

        if (isset($_GET["composant"])) {

            $composant = $_GET["composant"];
        } else {

            $composant = "";
        }

        function chargerComposantControleur($composantControleur) {
            require $composantControleur . "/" . $composantControleur . "_controleur.php";
        }

        spl_autoload_register("chargerComposantControleur");

        if ($composant == "composant_1") {

            $controleur = new composant_1();
            $controleur->afficherDonnees();
        }
        ?>
    </body>
</html>
